﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExtJSExtender.Controls
{
    public class TreeTriggerPostBackEvevts
    {
        #region NodeClick
        private bool nodeClickEvent = false;
        /// <summary>
        /// 节点单击事件，默认不触发PostBack
        /// </summary>
        public bool NodeClick { get { return nodeClickEvent; } set { nodeClickEvent = value; } }
        #endregion

        #region NodeSelectChanged
        private bool nodeSelectChangedEvent = false;
        /// <summary>
        /// 节点选择改变的事件，默认不触发PostBack
        /// </summary>
        public bool NodeSelectChanged { get { return nodeSelectChangedEvent; } set { nodeSelectChangedEvent = value; } }
        #endregion

        #region NodeCheckChanged
        private bool nodeCheckChangedEvent = false;
        /// <summary>
        /// 节点勾选改变的事件，默认不触发PostBack
        /// </summary>
        public bool NodeCheckChanged { get { return nodeCheckChangedEvent; } set { nodeCheckChangedEvent = value; } }
        #endregion

        #region NodeExpand
        private bool nodeExpandEvent = false;
        /// <summary>
        /// 节点展开的事件，默认不触发PostBack
        /// </summary>
        public bool NodeExpand { get { return nodeExpandEvent; } set { nodeExpandEvent = value; } }
        #endregion

        #region NodeCollapse
        private bool nodeCollapseEvent = false;
        /// <summary>
        /// 节点折叠的事件，默认不触发PostBack
        /// </summary>
        public bool NodeCollapse { get { return nodeCollapseEvent; } set { nodeCollapseEvent = value; } }
        #endregion

        #region LoadChildren
        private bool loadChildrenEvent = false;
        /// <summary>
        /// 加载子节点的事件，如果此事件未对node的children赋值，则执行客户端的异步加载
        /// 触发条件：当节点展开以后，如果没有子节点，则触发该事件
        /// </summary>
        public bool LoadChildren { get { return loadChildrenEvent; } set { loadChildrenEvent = value; } }
        #endregion
    }
}
